﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Model.ZXBuiness;
using Xproject.Framework.Core.Repositories;
using Xproject.Framework.Utility.Extensions;

namespace Repository.ZXBuiness
{
   public static class ZXProductRateRep
    {

        public static ZXProductRate GetByproductId(this IRepositoryAsync<ZXProductRate> repository, string productId)
        {
            Expression<Func<ZXProductRate, bool>> express = i => 1 == 1;
            express = express.AndAlso(i => i.ProductId == productId);
            return repository.Query().Where(express).Select().FirstOrDefault();
        }


    }
}
